package com.github.aloxc.plugin.restplus.action;

import com.intellij.openapi.actionSystem.AnAction;
import com.intellij.openapi.actionSystem.AnActionEvent;
import org.jetbrains.annotations.NotNull;

import javax.swing.*;

public class licenseAction extends AnAction {
    private static final String TITLE = "RestPlus";

    public licenseAction() {
        super(TITLE);
    }

    public void actionPerformed(@NotNull AnActionEvent anActionEvent) {
        final boolean isLicensed = CheckLicense.isLicensed();
        final String message = "Sample Plugin with License Support.\nLicense successfully obtained: " + (isLicensed? "yes" : "no");
        JOptionPane.showMessageDialog(JOptionPane.getRootFrame(), message, TITLE, JOptionPane.INFORMATION_MESSAGE);
    }

    public void update(@NotNull AnActionEvent e) {
        super.update(e);
    }
}
